import os

from channels.auth import AuthMiddlewareStack

from . import routing
from channels.routing import ProtocolTypeRouter, URLRouter
from django.core.asgi import get_asgi_application
# print("当然了A")

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') # websocket_study是项目的每次

application = ProtocolTypeRouter({
    "http": get_asgi_application(),
    "websocket": URLRouter(routing.websocket_urlpatterns),
})